Ubuntu Terminal Shell - gpawade/gpawade.github.io GitHub Wiki

Basic Command

# print working directory
$ pwd			

# provide the help of command
$ man command_name	

# locate the command/ return the path name
$ which	command_name	

# Listing
$ ls
$ ls -a 	 	# List hidden file


# Change Directory
$ cd ~  		# Navigate to home directory
$ cd /			# Navigate to root directory
$ cd -			# Navigate to previus directory

# Move File - mv [file-name] [directory-name]
$ mv file-to-move directory/

# Copy File
$ cp file1 file2

# Remove file / directory
$ rm filename
$ rmdir dirname			# Remove directory

Installing package

# use apt-get to install the package
$ sudo apt-get install package_name

# remove package
$ sudo apt-get remove package_name


# Install .deb file
$ sudo dpkg -i  pakage_file_name.deb

More helpful commmand

# grep - find string in file, can used regular expression
$ grep 'search_string' file_name


# services
$ service --status-all 			# list all services
$ service service_name start		# start service
$ service service_name stop		# stop service
$ sudo status service_name 		# check the service status

# Proccess
$ ps					# display all running proccess

EDITOR

  • gedit
  • nano
  • vi
  • vim
  • subl
⚠️ **GitHub.com Fallback** ⚠️