This guide provides a quick reference for essential Ubuntu commands. These commands cover basic system management, file operations, package management, and more.
pwd
: Print the current working directory. ls
: List files and directories. cd
: Change directory. mkdir
: Create a new directory. rmdir
: Remove an empty directory. cp
: Copy files or directories. mv
: Move or rename files or directories. rm
: Remove files or directories. touch
: Create an empty file. cat
: Concatenate and display the content of a file. nano
: Text editor for modifying files. head
: Display the first lines of a file. tail
: Display the last lines of a file. chmod
: Change file permissions. chown
: Change file owner. whoami
: Display the current logged-in user. sudo
: Execute a command with superuser privileges. passwd
: Change user password. su
: Switch user. apt
: Advanced Package Tool for package management. apt update
: Update package lists. apt upgrade
: Upgrade installed packages. apt install
: Install new packages. apt remove
: Remove packages. apt search
: Search for packages. uname
: Display system information. lsb_release
: Display Ubuntu release information. df
: Display disk space usage. free
: Display memory usage. ifconfig
: Display network interface information. ping
: Test network connectivity. nslookup
: Query DNS servers. netstat
: Display network statistics. ps
: Display information about active processes. kill
: Terminate a process. top
: Display dynamic real-time system statistics. apt update
: Update package lists. apt upgrade
: Upgrade installed packages. apt dist-upgrade
: Upgrade the distribution. do-release-upgrade
: Upgrade to a new Ubuntu release. history
: Display command history. echo
: Display a message. date
: Display the current date and time. shutdown
: Shut down the system. reboot
: Restart the system. These commands cover a range of basic operations for managing your Ubuntu system. Explore and use them according to your needs.
Go back to Ubuntu Guide.
Visit other Developer Guides.