top of page
Writer's pictureBansi Patel

Linux Commands




Basic Linux commands:


#ls -al = Displays information about all files/directories (including hidden)


#pwd = Show the path of current directory


#mkdir directory-name = Create a directory


#rm file-name = Delete file


#rm -r directory-name = Delete directory recursively


#rm -f file-name = Forcefully remove file


#rm -rf directory-name = Forcefully remove directory recursively


#cp file1 file2 = Copy file 1 to file 2


#cp -r dir1 dir2 = Copy dir1 to dir2, create dir2 if it doesn't exist


#mv file1 file2 = Rename source to dest/ move source to directory


#ln -s /path/to/file-name link-name = Create symbolic link to file link


#touch file = Create or update file


#cat > file = Place standard input into file


#more file = Output contents of file


#head file = Output first 10 lines of file


#tail file = Output last 10 lines of file


#tail -f file = Output contents of file as it grows starting with the last 10 lines


#gpg -c file = Encrypt file


#gpg file.gpg = Decrypt file


#wc = Print the number of bytes, words, and lines in files


#xargs = Execute command lines from standard input


#ps = Display your currently active processes


#usermod = Modify user information


#id = Show the active user id with login and group


#last = Show last logins on the system


#who = Show who is logged on the system


#userdel sam = Delete user "sam"


#adduser sam = Add user "sam"


#whoami = Who you are logged in as


#finger user = Display information about user


#date = Show the current date


#cal = Show this month calendar


#w = Display who is online


#uname -a = Display linux system information


#uname -r = Display kernel release information



#

27 views0 comments

Recent Posts

See All

Comentarios


bottom of page