Some Linux Commands

Basic commands

List, copy, move/rename files/directories, remove files

$ ls -lh
$ cp  [destination]
$ mv  [destination]
$ rm [file-name]

Get help, check available disk space, find a file in the current directory and all subdirectories, find out to what group [username] belongs

$ man [command]
$ df
$ find . -name testfile.txt
$ groups [username]

Make and remove directories

$ mkdir [dir]
$ rm -r [dir]

Make a symbolic link

$ ln -s  [destination]
Add and remove users and groups
$ sudo adduser [options] username
$ sudo usermod -aG sudo username
$ sudo userdel -r username
$ sudo groupdel Group_Name

Add user to group (The -G option refers to the groupname that follows).

$ sudo usermod -a -G {groupname} {username}

Remove a user from a group (Note: You have to specify the [groupname] in the command. Failure to do so will result in the removal of the user!).

$ sudo deluser [username] [groupname]

Reboot the server from the command line

$ sudo reboot