Linux Commands Flashcards
What does LS do
Simply lists all files in directory
What does LS do
What does PWD do
Prints working directory
What does MV do
Helps you move a file from one location to another, i.e. mc mvtesting.txt /home/kola/downloads
How do I change the permisions of a file?
Using the chmod command
What does cp do
Copies a file, cp testing.txt /home/kola/downloads
What does rm, and rmdir do
Delets a file (RM Testing123.txt) or a registery (rmdir old_folder)
What does chown do?
CLets you amend the owner of a file (sudo chown YK script.ssh) , YK is now the owner
How do I install an applciation?
sudo apt-get install “nameofprogram”
What does df-h show?
It shows the free space on a drive in GB
What does ps -e | -more show?
Shows ALL process running in the background , |e specifies for all users
what does the top
Similar to ps |e shows all process running, but shows the top ones first
How do you create a new file?
Using the touch command so touch newfile.txt
How do I stay in super user
Sudo su
How do i create a new user?
Using adduser “name”
How do I change the user
Su -“name”
How do I check all users on system
cat /etc/passwd
How do I delete user?
sudo userdel “name”
How do I add a user to a group
Sudo usermod -aG sudo “name”
How do I remove an individual from a group
sudo gpasssword -d name sudo, removes “name” from the sudo group