Ubuntu - Linux Commands List

Commonly used commands in Ubuntu Linux


Logo Source - freepnglogos.com


1. Navigating the File System:

   - `cd`: Change directory.

   - `pwd`: Print working directory.

   - `ls`: List directory contents.

   - `mkdir`: Make a directory.

   - `rmdir`: Remove a directory.


2. File Operations:

   - `cp`: Copy files/directories.

   - `mv`: Move files/directories.

   - `rm`: Remove/delete files or directories.

   - `touch`: Create an empty file.

   - `nano` or `vim` (text editors): Open a text file for editing.


3. Viewing Content:

   - `cat`: Concatenate and display the content of files.

   - `less` or `more`: Display content one screen at a time.

   - `head` and `tail`: Display the beginning or end of a file.


4. File Permissions:

   - `chmod`: Change file permissions.

   - `chown`: Change file owner.

   - `chgrp`: Change file group.


5. User Management:

   - `whoami`: Display the current logged-in user.

   - `passwd`: Change user password.

   - `su`: Switch user.

   - `sudo`: Execute a command with superuser privileges.


6. Package Management:

   - `apt-get`: Package handling utility (install, remove, update packages).

     - `apt-get install package_name`

     - `apt-get remove package_name`

     - `apt-get update`

     - `apt-get upgrade`


7. Process Management:

   - `ps`: Display information about running processes.

   - `kill`: Terminate a process.

   - `top`: Display and update sorted information about processes.


8. Networking:

   - `ifconfig` or `ip`: Display network configuration.

   - `ping`: Check network connectivity.

   - `wget` or `curl`: Download files from the internet.


9. System Information:

   - `uname`: Display system information.

   - `df`: Display disk space usage.

   - `free`: Display amount of free and used memory.


10. Archives:

    - `tar`: Create or extract tar archives.

      - `tar -cvf archive.tar files`: Create a tar archive.

      - `tar -xvf archive.tar`: Extract files from a tar archive.


11. Search and Find:

    - `grep`: Search for a pattern in files.

    - `find`: Search for files and directories.


12. Shell Features:

    - `echo`: Display a message.

    - `export`: Set environment variables.

    - `source` or `.`: Execute commands from a file.


These are just some of the basic commands. Linux has a rich set of commands, and you can always refer to the manual pages using `man` command for more details about each command. For example, `man ls` will give you the manual for the `ls` command.

Previous Post Next Post

Ads

Ads