Category Archives: Ubuntu

Commonly used ubuntu commands

List of commonly used linux commands:

Directory related

cd: to change the directory, (cd ..), cd dir-name
mkdir dirname: create a new directory
ls: to list the contents of the directory
rm filename: to delete the single file
rm dirname: if the directory is empy
rmr -f path: removes all the folder, subfolders and files within them, for example, to delete the directory songs(which might have files and subfolders) we can simply write

rmr -f songs
mv souce destination : move the souce diectory/file to destination

Editor related commands

VIM editor:
$ sudo apt-get install vim
Save and exit: Esc+:wq, i for insert mode,
Exit without save: Esc+:q!
Exit: Esc+:x

VI:

NANO: Save and exit: Ctrl+X

chmod 700 file.sh : Change file permission (To run : ./file.sh)

Extract zip files

tar -xzvf cudnn-9.0-linux-x64-v7.tgz

Install deb file

sudo dpkg -i yourdebfile.deb

Check Ubuntu Version: $ lsb_release -a

Change file and folder permission:

top -U user

ps -ef

Enable root login in Ubuntu

Create/update the root password
$ sudo passwd root
Open below file and add the line at the end of the file
$ sudo nano /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

greeter-show-manual-login=true

 

Advertisements