LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What is mean by these linux commands (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-mean-by-these-linux-commands-4175552931/)

Raakh5 09-08-2015 10:26 AM

What is mean by these linux commands
 
Hello,

Code:

useradd 8618718235810    //user added
mkdir /home/8618718235810    //directory created


chown 8618718235810:8618718235810 /home/8618718235810
cp -r ~/tg  /home/8618718235810/
su 8618718235810
cd ~/tg && bin/telegram-cli

Can anybody please explain the above code?

Best regards

suicidaleggroll 09-08-2015 10:31 AM

Line by line...

It creates a new user with the username "8618718235810" - which is a very odd username indeed
It creates a home directory for that new user
It changes the permissions of that directory to belong to the new user
It copies some directory called "tg" from root's home directory into this new user's home directory
It switches to the "8618718235810" user
It executes some file called telegram-cli located in ~/tg/bin in the new user's home directory

Raakh5 09-08-2015 10:35 AM

Thanks from the bottom of my heart

Raakh5 09-08-2015 10:36 AM

How to uninstall software in CentOS
 
Hello,

I installed one API using the following commands

Code:

git clone --recursive https://github.com/vysheng/tg.git
yum install lua-devel openssl-devel libconfig-devel readline-devel libevent-devel libjansson-devel python-devel
./configure  --disable-json
make

how can I uninstall properly

Best regards

Raakh5 09-08-2015 10:41 AM

Code:

chown 8618718235810:8618718235810 /home/8618718235810
why this is written 8618718235810:8618718235810 in chown command? Is this command not enough to set permission "/home/8618718235810"

hortageno 09-08-2015 11:26 AM

Quote:

Originally Posted by Raakh5 (Post 5417532)
Code:

chown 8618718235810:8618718235810 /home/8618718235810
why this is written 8618718235810:8618718235810 in chown command? Is this command not enough to set permission "/home/8618718235810"

"/home/8618718235810" is not a command. It is the folder which permission you want to change and is used as argument for the chown command.

Because root created the directory "/home/8618718235810", it is then owned by root:root. For the user 8618718235810 to be able to login, this folder needs to be owned by him and his group (user:group).

If you don't understand, what a command is doing, type

Code:

man <command>
and in this case
Code:

man chown
into a terminal and read.

Raakh5 09-08-2015 12:03 PM

Thank again from the bottom of my heart


All times are GMT -5. The time now is 06:59 PM.